package com.powernode.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Description: 白名单配置类
 * @Author: Tong Ziyu
 * @Date: 2024/10/8 21:32
 */
@Data
@Component
@RefreshScope  // 在不重新加载的情况下动态刷新配置
@NoArgsConstructor
@AllArgsConstructor
@ConfigurationProperties(prefix = "gateway.white")
public class AccessWhiteList {

    /**
     * 放行的路径
     */
    private List<String> allowUrls;

}
